#!/bin/bash
N=0
NRun=32
ValueFilter=0
Mdir="/sps/isc/rneveu/"
BATCHdir="OutputCC/"
Separator="/"

STemp=32
S=$STemp

while [ $S -lt $NRun ]
do
NomFichierSH="launch_FileJournal${N}Filter${ValueFilter}_${S}.sh"
cat >$NomFichierSH <<EOF
#!/bin/bash
matlab R2016b -nodesktop -nojvm -nodisplay -nosplash -r "addpath('/sps/isc/rneveu/EtudeIRM/Nature');FilterNatureAuthors(${S},${N},${ValueFilter});quit;"
EOF

qsub -P P_isc -e $Mdir$BATCHdir -o $Mdir$BATCHdir -l h_rss=10G -l h_fsize=10G -l h_cpu=23:45:00 -l matlab=1 -l sps=1 -N FileJournal${N}Filter${ValueFilter}_${S} launch_FileJournal${N}Filter${ValueFilter}_${S}.sh

let "S += 1"

done

ValueFilter=1

S=$STemp

while [ $S -lt $NRun ]
do
NomFichierSH="launch_FileJournal${N}Filter${ValueFilter}_${S}.sh"
cat >$NomFichierSH <<EOF
#!/bin/bash
matlab R2016b -nodesktop -nojvm -nodisplay -nosplash -r "addpath('/sps/isc/rneveu/EtudeIRM/Nature');FilterNatureAuthors(${S},${N},${ValueFilter});quit;"
EOF

qsub -P P_isc -e $Mdir$BATCHdir -o $Mdir$BATCHdir -l h_rss=10G -l h_fsize=10G -l h_cpu=23:45:00 -l matlab=1 -l sps=1 -N FileJournal${N}Filter${ValueFilter}_${S} launch_FileJournal${N}Filter${ValueFilter}_${S}.sh

let "S += 1"

done

N=2
ValueFilter=0
Mdir="/sps/isc/rneveu/"
BATCHdir="OutputCC/"
Separator="/"

S=$STemp

while [ $S -lt $NRun ]
do
NomFichierSH="launch_FileJournal${N}Filter${ValueFilter}_${S}.sh"
cat >$NomFichierSH <<EOF
#!/bin/bash
matlab R2016b -nodesktop -nojvm -nodisplay -nosplash -r "addpath('/sps/isc/rneveu/EtudeIRM/Nature');FilterNatureAuthors(${S},${N},${ValueFilter});quit;"
EOF

qsub -P P_isc -e $Mdir$BATCHdir -o $Mdir$BATCHdir -l h_rss=10G -l h_fsize=10G -l h_cpu=23:45:00 -l matlab=1 -l sps=1 -N FileJournal${N}Filter${ValueFilter}_${S} launch_FileJournal${N}Filter${ValueFilter}_${S}.sh

let "S += 1"

done

ValueFilter=1

S=$STemp

while [ $S -lt $NRun ]
do
NomFichierSH="launch_FileJournal${N}Filter${ValueFilter}_${S}.sh"
cat >$NomFichierSH <<EOF
#!/bin/bash
matlab R2016b -nodesktop -nojvm -nodisplay -nosplash -r "addpath('/sps/isc/rneveu/EtudeIRM/Nature');FilterNatureAuthors(${S},${N},${ValueFilter});quit;"
EOF

qsub -P P_isc -e $Mdir$BATCHdir -o $Mdir$BATCHdir -l h_rss=10G -l h_fsize=10G -l h_cpu=23:45:00 -l matlab=1 -l sps=1 -N FileJournal${N}Filter${ValueFilter}_${S} launch_FileJournal${N}Filter${ValueFilter}_${S}.sh

let "S += 1"

done

N=3
NRun=32
ValueFilter=0
Mdir="/sps/isc/rneveu/"
BATCHdir="OutputCC/"
Separator="/"

STemp=1
S=$STemp

while [ $S -lt $NRun ]
do
NomFichierSH="launch_FileJournal${N}Filter${ValueFilter}_${S}.sh"
cat >$NomFichierSH <<EOF
#!/bin/bash
matlab R2016b -nodesktop -nojvm -nodisplay -nosplash -r "addpath('/sps/isc/rneveu/EtudeIRM/Nature');FilterNatureAuthors(${S},${N},${ValueFilter});quit;"
EOF

qsub -P P_isc -e $Mdir$BATCHdir -o $Mdir$BATCHdir -l h_rss=10G -l h_fsize=10G -l h_cpu=23:45:00 -l matlab=1 -l sps=1 -N FileJournal${N}Filter${ValueFilter}_${S} launch_FileJournal${N}Filter${ValueFilter}_${S}.sh

let "S += 1"

done

ValueFilter=1

S=$STemp

while [ $S -lt $NRun ]
do
NomFichierSH="launch_FileJournal${N}Filter${ValueFilter}_${S}.sh"
cat >$NomFichierSH <<EOF
#!/bin/bash
matlab R2016b -nodesktop -nojvm -nodisplay -nosplash -r "addpath('/sps/isc/rneveu/EtudeIRM/Nature');FilterNatureAuthors(${S},${N},${ValueFilter});quit;"
EOF

qsub -P P_isc -e $Mdir$BATCHdir -o $Mdir$BATCHdir -l h_rss=10G -l h_fsize=10G -l h_cpu=23:45:00 -l matlab=1 -l sps=1 -N FileJournal${N}Filter${ValueFilter}_${S} launch_FileJournal${N}Filter${ValueFilter}_${S}.sh

let "S += 1"

done

N=4
ValueFilter=0
Mdir="/sps/isc/rneveu/"
BATCHdir="OutputCC/"
Separator="/"

S=$STemp

while [ $S -lt $NRun ]
do
NomFichierSH="launch_FileJournal${N}Filter${ValueFilter}_${S}.sh"
cat >$NomFichierSH <<EOF
#!/bin/bash
matlab R2016b -nodesktop -nojvm -nodisplay -nosplash -r "addpath('/sps/isc/rneveu/EtudeIRM/Nature');FilterNatureAuthors(${S},${N},${ValueFilter});quit;"
EOF

qsub -P P_isc -e $Mdir$BATCHdir -o $Mdir$BATCHdir -l h_rss=10G -l h_fsize=10G -l h_cpu=23:45:00 -l matlab=1 -l sps=1 -N FileJournal${N}Filter${ValueFilter}_${S} launch_FileJournal${N}Filter${ValueFilter}_${S}.sh

let "S += 1"

done

ValueFilter=1

S=$STemp

while [ $S -lt $NRun ]
do
NomFichierSH="launch_FileJournal${N}Filter${ValueFilter}_${S}.sh"
cat >$NomFichierSH <<EOF
#!/bin/bash
matlab R2016b -nodesktop -nojvm -nodisplay -nosplash -r "addpath('/sps/isc/rneveu/EtudeIRM/Nature');FilterNatureAuthors(${S},${N},${ValueFilter});quit;"
EOF

qsub -P P_isc -e $Mdir$BATCHdir -o $Mdir$BATCHdir -l h_rss=10G -l h_fsize=10G -l h_cpu=23:45:00 -l matlab=1 -l sps=1 -N FileJournal${N}Filter${ValueFilter}_${S} launch_FileJournal${N}Filter${ValueFilter}_${S}.sh

let "S += 1"

done

N=10
ValueFilter=0
Mdir="/sps/isc/rneveu/"
BATCHdir="OutputCC/"
Separator="/"

S=$STemp

while [ $S -lt $NRun ]
do
NomFichierSH="launch_FileJournal${N}Filter${ValueFilter}_${S}.sh"
cat >$NomFichierSH <<EOF
#!/bin/bash
matlab R2016b -nodesktop -nojvm -nodisplay -nosplash -r "addpath('/sps/isc/rneveu/EtudeIRM/Nature');FilterNatureAuthors(${S},${N},${ValueFilter});quit;"
EOF

qsub -P P_isc -e $Mdir$BATCHdir -o $Mdir$BATCHdir -l h_rss=10G -l h_fsize=10G -l h_cpu=23:45:00 -l matlab=1 -l sps=1 -N FileJournal${N}Filter${ValueFilter}_${S} launch_FileJournal${N}Filter${ValueFilter}_${S}.sh

let "S += 1"

done

ValueFilter=1

S=$STemp

while [ $S -lt $NRun ]
do
NomFichierSH="launch_FileJournal${N}Filter${ValueFilter}_${S}.sh"
cat >$NomFichierSH <<EOF
#!/bin/bash
matlab R2016b -nodesktop -nojvm -nodisplay -nosplash -r "addpath('/sps/isc/rneveu/EtudeIRM/Nature');FilterNatureAuthors(${S},${N},${ValueFilter});quit;"
EOF

qsub -P P_isc -e $Mdir$BATCHdir -o $Mdir$BATCHdir -l h_rss=10G -l h_fsize=10G -l h_cpu=23:45:00 -l matlab=1 -l sps=1 -N FileJournal${N}Filter${ValueFilter}_${S} launch_FileJournal${N}Filter${ValueFilter}_${S}.sh

let "S += 1"

done
